package com.maiyuren.fishkit.utils

import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.maiyuren.fishkit.FishkitApplication

fun Float.toDp(): Dp {
    val scale = FishkitApplication.instance.resources.displayMetrics.density
    return (this / scale + 0.5F).dp
}